package com.pheruagor.handmanager.storage.api {
    import com.pheruagor.handmanager.model.business.Member;
    import com.pheruagor.handmanager.model.business.activity.PlayerActivity;


    /**
     * All class that manage player activities storage must implement this interface
     */
    public interface PlayerActivityStorage {

        /**
         * Save the specified activity
         *
         * @param activity
         * 		the activity to save
         */
        function saveActivity(activity:PlayerActivity, onResult:Function = null, onFault:Function = null):void;

        /**
         * List all activities from the specified member
         *
         * @param member
         * 		the member who have the activities to list
         */
        function listActivities(member:Member, onResult:Function, onFault:Function = null):void;

        /**
         * Remove the specified activity
         *
         * @param activityId
         * 		the id of the activity to remove
         */
        function removeActivity(activityId:String, onResult:Function = null, onFault:Function = null):void;

        /**
         * Remove all the activities from a specified member
         *
         * @param member
         * 		the member who have the activities to remove
         */
        function removeAllActivitiesFromMember(member:Member, onResult:Function = null, onFault:Function = null):void

        /**
         * Remove all the activities from the storage
         */
        function removeAllActivities(onResult:Function = null, onFault:Function = null):void;
    }
}